
package com.idealighter.game.games.foursshop.handler;

import com.idealighter.game.core.annotation.ResMsgHandler;
import com.idealighter.game.games.foursshop.message.ResBetResultMsg;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.robot.core.Player;
import com.idealighter.game.robot.handler.ResMessageHandler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


@ResMsgHandler(504221)
public class ResBetResultHandler implements ResMessageHandler {

  private static final Logger LOG = LoggerFactory.getLogger(ResBetResultHandler.class);

  @Override
  public void action(Player player, ResMessage message) {
    ResBetResultMsg msg = (ResBetResultMsg) message;
    if (msg.getResult() == 0) {
      LOG.info("[4s]玩家[{}][{}]下注成功", player.playerId, player.playerInfo.getNickName());
    } else {
      LOG.info("[4s]玩家[{}][{}]下注失败", player.playerId, player.playerInfo.getNickName());
    }

  }
}
